package com.example.cas.clientone.casConfig;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

/**
 * @program: casdemo
 * @description: cas配置信息初始化
 * @author: 张 桥
 * @create: 2020-08-18 10:14
 */

@Configuration
public class CasAutoProperties {
    //cas服务端的地址
    @Value("${cas.server-url-prefix}")
    private  String casServerUrlPrefix;

    //服务端的登录地址
    @Value("${cas.server-login-url}")
    private  String casServerLoginUrl;

    //当前服务器的地址
    @Value("${cas.client-host-url}")
    private  String serverName;

    //Ticket校验器使用Cas30ProxyReceivingTicketValidationFilter
    @Value("${cas.validation-type}")
    private  String validationType;

    public String getCasServerUrlPrefix() {
        return casServerUrlPrefix;
    }

    public String getCasServerLoginUrl() {
        return casServerLoginUrl;
    }

    public String getServerName() {
        return serverName;
    }

    public String getValidationType() {
        return validationType;
    }
}
